package com.custom.action.joiner.interfaces;

import com.custom.comm.utils.lambda.SFunction;

import java.io.Serializable;

/**
 * On后面的关联条件
 * @author Xiao-Bai
 * @since 2023/5/4 12:29
 */
public interface OnCondition<Children> extends Serializable {


    default <A, B> Children eq(SFunction<A, ?> aColumn, SFunction<B, ?> bColumn) {
        return eq(true, aColumn, bColumn);
    }
    <A, B> Children eq(boolean condition, SFunction<A, ?> aColumn, SFunction<B, ?> bColumn);



    default <A, B> Children ne(SFunction<A, ?> aColumn, SFunction<B, ?> bColumn) {
        return ne(true, aColumn, bColumn);
    }
    <A, B> Children ne(boolean condition, SFunction<A, ?> aColumn, SFunction<B, ?> bColumn);



    default <A, B> Children ge(SFunction<A, ?> aColumn, SFunction<B, ?> bColumn) {
        return ge(true, aColumn, bColumn);
    }
    <A, B> Children ge(boolean condition, SFunction<A, ?> aColumn, SFunction<B, ?> bColumn);



    default <A, B> Children gt(SFunction<A, ?> aColumn, SFunction<B, ?> bColumn) {
        return gt(true, aColumn, bColumn);
    }
    <A, B> Children gt(boolean condition, SFunction<A, ?> aColumn, SFunction<B, ?> bColumn);



    default <A, B> Children le(SFunction<A, ?> aColumn, SFunction<B, ?> bColumn) {
        return le(true, aColumn, bColumn);
    }
    <A, B> Children le(boolean condition, SFunction<A, ?> aColumn, SFunction<B, ?> bColumn);


    default <A, B> Children lt(SFunction<A, ?> aColumn, SFunction<B, ?> bColumn) {
        return lt(true, aColumn, bColumn);
    }
    <A, B> Children lt(boolean condition, SFunction<A, ?> aColumn, SFunction<B, ?> bColumn);




}
